@import url('https://fonts.googleapis.com/css?family=Lobster');
@import url('https://fonts.googleapis.com/css?family=Indie+Flower');
* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

body {
  /* background-image: radial-gradient(#12c2e9,#c471ed,#f64f59); */
  background: url("../images/bg.jpg");
  width: 100%;
  height: 100%;
}

#card-front {
  color: #FFDFDF;
  z-index: 10;
}

#card, #card-front, #card-inside {
  height: 580px;
}

.wrap {
  padding: 1.5em 2.5em;
  height: 100%;
}

#card-front, #card-inside {
  width: 50%;
  -webkit-box-shadow: 2px 2px 30px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.5);
          box-shadow: 2px 2px 30px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.5);
  position: absolute;
  left: 50%;
}

#card-inside .wrap {
  background: #FFEFEF;
  -webkit-box-shadow: inset 2px 0 1px rgba(0, 0, 0, 0.05);
          box-shadow: inset 2px 0 1px rgba(0, 0, 0, 0.05);
}

#card {
  width: 960px;
  margin: auto;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  -webkit-perspective: 5000px;
          perspective: 5000px;
  -webkit-transform: translateX(-25%);
          transform: translateX(-25%);
  -webkit-transition: -webkit-transform 1s ease-in-out;
  transition: -webkit-transform 1s ease-in-out;
  transition: transform 1s ease-in-out;
  transition: transform 1s ease-in-out, -webkit-transform 1s ease-in-out;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
}

#card h1 {
  text-align: center;
  font-family: 'Lobster', cursive;
  font-style: italic;
  font-size: 70px;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15), 1px 1px 0 #ffc8c8, 2px 2px 0 #ff9696, 3px 3px 0 #ff7d7d;
  color: #FFF;
}

#card-inside {
  font-size: 1.3em;
  line-height: 1.4;
font-family: 'Lobster';
  color: #331717;
  font-style: italic;
}

p {
  margin-top: 1em;
}

p:first-child {
  margin-top: 0;
}

p.signed {
  margin-top: 1.5em;
  text-align: center;
font-family: 'Indie Flower', cursive;
  font-size: 1.5em;
}

#card-front {
  background-color: #ee9ca7;
  background-image: -webkit-gradient(linear, left top, left bottom, from(#FF5555), to(#FF7777));
  background-image: linear-gradient(top, #FF5555 0%, #FF7777 100%);
  -webkit-transform-origin: left;
          transform-origin: left;
  -webkit-transition: -webkit-transform 1s linear;
  transition: -webkit-transform 1s linear;
  transition: transform 1s linear;
  transition: transform 1s linear, -webkit-transform 1s linear;
  position: relative;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  -webkit-perspective: 5000px;
          perspective: 5000px;
}

#card-front:before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  background-color: #444;
  -webkit-transform: translateZ(-1px);
          transform: translateZ(-1px);
}

#card-front .wrap {
  -webkit-transition: background 1s linear;
  transition: background 1s linear;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

#card-front button {
  position: absolute;
  bottom: 1em;
  right: -12px;
  background: #F44;
  color: #FFF;
  font-family: 'Lobster', cursive;
  font-style: italic;
  font-weight: bold;
  font-size: 1.5em;
  padding: .5em;
  border: none;
  cursor: pointer;
  -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.4);
          box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.4);
}

#card-front button:hover,
#card-front button:focus {
  background: #F22;
}

#close {
  display: none;
}

#card.open-fully {
  -webkit-transform: translateX(0%);
          transform: translateX(0%);
}

#card.open-fully #close,
#card-open-half #close {
  display: inline;
}

#card.open-fully #open {
  display: none;
}

#card.open-half #card-front,
#card.close-half #card-front {
  -webkit-transform: rotateY(-90deg);
          transform: rotateY(-90deg);
}

#card.open-half .shadow {
  background-color: rgba(0, 0, 0, 0.5);
}

#card.open-fully #card-front,
#card.close-half #card-front {
  background: #FFEFEF;
}

#card.open-fully #card-front {
  -webkit-transform: rotateY(-180deg);
          transform: rotateY(-180deg);
}

#card.open-fully .shadow {
  background-color: rgba(0, 0, 0, 0);
}
.container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.img {
  height: 100px;
  width: 100px;
}
.container div {
  position: absolute;
  display: block;
}
.container div:nth-child(1) {
  left: 80%;
  animation: heart 15s linear infinite;
  animation-delay: -5s;
}
.container div:nth-child(2) {
  left: 85%;
  animation: heart 20s linear infinite;
  animation-delay: -5s;
}
.container div:nth-child(3) {
  left: 82%;
  animation: heart 25s linear infinite;
}
.container div:nth-child(4) {
  left: 25%;
  animation: heart 15s linear infinite;
  animation-delay: -7s;
}
.container div:nth-child(5) {
  left: 20%;
  animation: heart 18s linear infinite;  /* 动画名称  持续时间  、、  持续运动次数 */
  animation-delay: -10s;
}
.container div:nth-child(6) {
  left: 15%;
  animation: heart 12s linear infinite;
}
.container div:nth-child(7) {
  left: 10%;
  animation: heart 14s linear infinite;
}
.container div:nth-child(8) {
  left: 7.5%;
  animation: heart 15s linear infinite;
}
.container div:nth-child(9) {
  left: 88%;
  animation: heart 10s linear infinite;
  animation-delay: 1s;
}
@keyframes heart
{
  0%
  {
      opacity: 0;
      top: 0%;
      transform: translateX(20px) rotate(0deg);
  }
  10%
  {
      opacity: 1;
  }
  20%
  {
      transform: translateX(-20px) rotate(45deg);
  }
  40%
  {
      transform: translateX(-20px) rotate(90deg);
  }
  60%
  {
      transform: translateX(20px) rotate(135deg);
  }
  80%
  {
      transform: translateX(-20px) rotate(180deg);
  }
  100%
  {
      top: 80%;
      transform: translateX(-20px) rotate(225deg);
  }
}
.container2 {
  transform: scale(0.9) rotateY(180deg);
  filter: blur(1px);
}
.container3 {
  transform: scale(0.8) rotateX(180deg);
  filter: blur(1.5px);
}
.container4 {
  transform: scale(1.2) rotateZ(360deg);
  filter: blur(1.5px);
}
.rose {
  padding-top: 0;
  display: flex;
  justify-content: space-between;
}
.rose .roseimg1 {
  /* padding-top: 0; */
  left: 0;
  transform:rotate(45deg);
  -moz-transform:rotate(45deg);
}
.rose .roseimg2 {
  right: 0;
  /* padding-top: 0; */
  transform:rotate(-45deg);
  -moz-transform:rotate(-45deg);
}
.rose>div img{
  width: 100px;
  height: 100px;
}
.animated {
  padding-top: 10px;
}
footer {
  max-width: 500px;
  margin: 40px auto;
  font-family: 'Lobster', cursive;
  font-size: 14px;
  line-height: 1.6;
  color: #888;
  text-align: center;
}

.cake_and_velas {
  position: absolute;
  bottom: 25%;
  left: 0;
  right: 0;
  overflow: hidden;
}

/* #cake {
  display: block;
  position: relative;
  margin: -10em auto 0 auto;
} */
.bookcake {
  height: 250px;
  width: 300px; 
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translateX(-50%);
} 
.cake {
  height: 60px;
  width: 180px;
  background-color: #fcf18e;
  position: absolute;
}
.c1 {
  bottom: 0;
  left: 60px;
  animation: leftfly 1s linear;
}
.cream {
  background-color: #fa406b;
  height: 10px;
  width: 100%;
  position: absolute;
  top: 30px;
}
@keyframes leftfly {
  0% {
    bottom: 0;
    left: 0;
  }
  10% {
    bottom: 0;
    left: 6px;
  }
  20% {
    bottom: 0;
    left: 12px;
  }
  30% {
    bottom: 0;
    left: 18px;
  }
  40% {
    bottom: 0;
    left: 24px;
  }
  50% {
    bottom: 0;
    left: 30px;
  }
  60% {
    bottom: 0;
    left: 36px;
  }
  70% {
    bottom: 0;
    left: 42px;
  }
  80% {
    bottom: 0;
    left: 48px;
  }
  90% {
    bottom: 0;
    left: 52px;
  }
  100% {
    bottom: 0;
    left: 60px;
  }
}
.icing {
  position: relative;
}
.icing>div{
  background-color: #fbd028;
  height: 12.5px;
  width: 26px;
  border-radius: 0 0 26px 26px;
  position: absolute;
}
.icing>div:nth-child(1) {
  left: -2px;
}
.icing>div:nth-child(2) {
  left: 26px;
}
.icing>div:nth-child(3) {
  left: 52px;
}
.icing>div:nth-child(4) {
  left: 78px;
}
.icing>div:nth-child(5) {
  left: 104px;
}
.icing>div:nth-child(6) {
  left: 130px;
}
.icing>div:nth-child(7) {
  left: 156px;
}
.cherries>div {
  background-color: #f7174c;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  position: absolute;
  top: -18px;
}
.cherries>div:nth-child(1) {
  left: 8px;
}
.cherries>div:nth-child(2) {
  left: 40px;
}
.cherries>div:nth-child(3) {
  left: 70px;
}
.cherries>div:nth-child(4) {
  left: 100px;
}
.cherries>div:nth-child(5) {
  left: 130px;
}
.cherries>div:nth-child(6) {
  left: 156px;
}
.c2 {
  transform: scale(0.8);
  bottom: 62px;
  right: 60px;
  z-index: -1;
  animation: rightfly 1s linear;
  
}
@keyframes rightfly {
  0% {
    bottom: 62px;
    right: 0;
  }
  10% {
    bottom: 62px;
    right: 6px;
  }
  20% {
    bottom: 62px;
    right: 12px;
  }
  30% {
    bottom: 62px;
    right: 18px;
  }
  40% {
    bottom: 62px;
    right: 24px;
  }
  50% {
    bottom: 62px;
    right: 30px;
  }
  60% {
    bottom: 62px;
    right: 36px;
  }
  70% {
    bottom: 62px;
    right: 42px;
  }
  80% {
    bottom: 62px;
    right: 48px;
  }
  90% {
    bottom: 62px;
    right: 52px;
  }
  100% {
    bottom: 62px;
    right: 60px;
  }
}
.c3 {
  transform: scale(0.6);
  bottom: 110px;
  left: 60px;
  z-index: -2;
  animation: topfly 1s linear ;
}
@keyframes topfly {
  0% {
    bottom: 160px;
    left: 60px;
  }
  10% {
    bottom: 155px;
    left: 60px;
  }
  20% {
    bottom: 150px;
    left: 60px;
  }
  30% {
    bottom: 145px;
    left: 60px;
  }
  40% {
    bottom: 140px;
    left: 60px;
  }
  50% {
    bottom: 135px;
    left: 60px;
  }
  60% {
    bottom: 130px;
    left: 60px;
  }
  70% {
    bottom: 125px;
    left: 60px;
  }
  80% {
    bottom: 120px;
    left: 60px;
  }
  90% {
    bottom: 115px;
    left: 60px;
  }
  100% {
    bottom: 110px;
    left: 60px;
  }
}
.candle {
  background-color: #f8f8f8;
  height: 50px;
  width: 20px;
  position: absolute;
  z-index: -3;
  bottom: 60px;
  left: 80px;
  animation: fadein 1.5s linear;
}
@keyframes fadein {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  60% {
    filter: blur(0.5px);
  }
  80% {
    filter: blur(0.75px);
  }
  100% {
    opacity: 1;
  }
}
.flame {
  background-color: #fbb200;
  height: 17px;
  width: 22px;
  border-radius: 0 50% 50% 0;
  box-shadow: 0 0 40px 10px rgba(245, 153, 7, 0.2);
  position: absolute;
  top: -22px;
  transform: rotate(45deg);
  animation: flame 2s 6.5s infinite;
}

.velas {
  background: #ffffff;
  border-radius: 10px;
  position: absolute;
  top: 228px;
  left: 50%;
  margin-left: -2.4px;
  margin-top: -8.33333333px;
  width: 5px;
  height: 35px;
  -webkit-transform: translateY(-300px);
          transform: translateY(-300px);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-animation: in 500ms 5s ease-out forwards;
          animation: in 500ms 5s ease-out forwards;
}

.velas:after,
.velas:before {
  background: rgba(255, 0, 0, 0.4);
  content: "";
  position: absolute;
  width: 100%;
  height: 2.22222222px;
}

.velas:after {
  top: 25%;
  left: 0;
}

.velas:before {
  top: 45%;
  left: 0;
}

.ani {
  border-radius: 100%;
  position: absolute;
  top: -20px;
  left: 50%;
  margin-left: -2.6px;
  width: 6.66666667px;
  height: 18px;
}

.ani:nth-child(1) {
  -webkit-animation: ani 2s 5.5s infinite;
          animation: ani 2s 5.5s infinite;
}

.ani:nth-child(2) {
  -webkit-animation: ani 1.5s 5.5s infinite;
          animation: ani 1.5s 5.5s infinite;
}

.ani:nth-child(3) {
  -webkit-animation: ani 1s 5.5s infinite;
          animation: ani 1s 5.5s infinite;
}

.ani:nth-child(4) {
  -webkit-animation: ani 0.5s 5.5s infinite;
          animation: ani 0.5s 5.5s infinite;
}

.ani:nth-child(5) {
  -webkit-animation: ani 0.2s 5.5s infinite;
          animation: ani 0.2s 5.5s infinite;
}
/* .anim-typewriter {
  animation: typewriter 4s steps(40) 1s 1 normal both,
  blinkTextCursor 500ms steps(40) infinite normal;

}
@keyframes typewriter {
  from {
      width: 0;
  }
  to {
      width: 16em;
  }
} */
@keyframes blinkTextCursor {
  from {
      border-right-color: rgba(255, 255, 255, 0.75);
  }
  to {
      border-right-color: transparent;
  }
} 

/* ============================================== Animation Fire
*/
@-webkit-keyframes ani {
  0%, 100% {
    background: rgba(254, 248, 97, 0.5);
    -webkit-box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
            box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
    -webkit-transform: translateY(0) scale(1);
            transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 50, 0, 0.1);
    -webkit-box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
            box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
    -webkit-transform: translateY(-20px) scale(0);
            transform: translateY(-20px) scale(0);
  }
}
@keyframes ani {
  0%, 100% {
    background: rgba(254, 248, 97, 0.5);
    -webkit-box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
            box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
    -webkit-transform: translateY(0) scale(1);
            transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 50, 0, 0.1);
    -webkit-box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
            box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
    -webkit-transform: translateY(-20px) scale(0);
            transform: translateY(-20px) scale(0);
  }
}
@-webkit-keyframes in {
  to {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}
@keyframes in {
  to {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}
.text {
  color: #8b6a60;
  font-family: 'Lobster', cursive;
  font-weight: 300;
  font-style: italic;
  text-align: center;
}
.text h1 {
  font-size: 1.4em;
}

.card-front_inside {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  width: 80%;
  margin: auto;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-transform: translateZ(-1px) rotateY(180deg);
          transform: translateZ(-1px) rotateY(180deg);
  background-color: #ffefef;
}

.shadow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-transform: translateZ(-2px) rotateY(180deg);
          transform: translateZ(-2px) rotateY(180deg);
  pointer-events: none;
  -webkit-transition: background 1s linear;
  transition: background 1s linear;
}

.photogallery {
  display: flex;
  position: absolute;
  margin: 0;
  padding: 0;
  /* top: 27%; */
  left: 50%;
  transform: translateX(-50%);
  /* left: 0; */
  /* transform: translateX(-50%); */
}
.photogallery1 {
  display: flex;
}
.photogallery2 {
  display: flex;
  margin-left: 50px;
}
.photogallery3 .polaroid{
  width: 65px;
  height: 85px;
}
.photogallery3 {
  display: flex;
  position: absolute;
  margin: 0;
  padding: 0;
  top: 43%;
  left: 50%;
  transform: translateX(-50%);
  /* left: 0; */
  /* transform: translateX(-50%); */
}
.photogallery4 {
  display: flex;
  position: absolute;
  margin: 0;
  padding: 0;
  top: 63%;
  left: 50%;
  transform: translateX(-50%);
  /* left: 0; */
  /* transform: translateX(-50%); */
}
.photogallery5 {
  display: flex;
  position: absolute;
  margin: 0;
  padding: 0;
  top: 82%;
  left: 50%;
  transform: translateX(-50%);
  /* left: 0; */
  /* transform: translateX(-50%); */
}
.polaroid {
  width: 60px;
  height: 80px;
  /* position: absolute; */
  /* float: left; */
  background: #1e1c18;
  border: 5px solid #f5f5f5;
  /* border-bottom: 50px solid #f5f5f5; */
  /* -webkit-box-shadow: 0 0 6px -1px #000;
          box-shadow: 0 0 6px -1px #000; */
  overflow: hidden;
  /* left: 0; */
  /* right: 0; */
  margin: auto;
  /* -webkit-transform: rotate(-5deg);
          transform: rotate(-5deg); */
  clear: both;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.polaroid img,
.polaroid .img {
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  background-position: center;
  background-size: cover;
  -webkit-animation: fade-in 10s ease-in;
          animation: fade-in 10s ease-in;
  -webkit-animation-iteration-count: 1;
          animation-iteration-count: 1;
}

@-webkit-keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
